package com.supreme.aspectserver.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
//@Component
public class ParameterAnnoAspect {

    @Pointcut(value = "@args(com.supreme.aspectserver.annotation.ParameterAnno)")
    public void PointCut() {
    }

    @Around("PointCut()")
    public Object aroundProcess(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info("[ParameterAnnoAspect] Before");
        Object proceed = joinPoint.proceed();
        log.info("[ParameterAnnoAspect] After");
        return proceed;
    }
}
